import * as THREE from "three";

export const Store=(option)=>{
  let optionCube = {
    length: option.length,
    width: option.width,
    height: option.height,
    position: {
      x: option.position.x,
      y: option.position.y,
      z: option.position.z
    },
    style: {
      transparent:1,
      opacity:0.2,
      color: 0x17CEBC,
      depthTest:0
    },
  };
  let boxGeometry = new THREE.BoxGeometry(optionCube.length,optionCube.height,optionCube.width);
  let meshPhongMaterial = new THREE.MeshPhongMaterial({
    color: optionCube.style.color,
    opacity: optionCube.style.opacity,
    depthTest: false,
    transparent: true
  });
  let mesh = new THREE.Mesh(boxGeometry,meshPhongMaterial);
  mesh.name=option.store_name;
  mesh.uuid=option.no;
  mesh.position.x=option.position.x;
  mesh.position.y=option.position.y;
  mesh.position.z=option.position.z;

  mesh.type="Store";
  return mesh;
}
